﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Printing;
using System.Linq;
using System.Text;

namespace Dycox.Reporting.Printing
{
    public class PaperNotFoundEventArgs : EventArgs
    {
        public PaperNotFoundEventArgs(Report report, string printerName, PaperSize systemPaperSize)
        {
            if (report == null)
                throw new ArgumentNullException("report");

            _systemPaperSize = systemPaperSize;
            _printerName = printerName;
            _report = report;
        }

        private PaperSize _systemPaperSize;

        public PaperSize PrinterPaperSize
        {
            get { return _systemPaperSize; }
        }

        private Report _report;

        private string _printerName;

        public string PrinterName
        {
            get { return _printerName; }
        }

        public string PaperName
        {
            get { return _report.PageSettings.PaperName; }
        }

        private bool _retry;

        public bool Retry
        {
            get { return _retry; }
            set { _retry = value; }
        }

        public SizeF DesiredPaperSize
        {
            get { return _report.PageSettings.PaperSize; }
        }

        public Report Report
        {
            get { return _report; }
        }

    }

    public delegate void PaperNotFoundEventHandler(object sender, PaperNotFoundEventArgs e);
}
